Skip to content

Add Db2/MSSQL/Oracle engines and TPC-H, Wikipedia, YCSB, CH-benCHmark benchmarks#21

Open
ribalba wants to merge 3 commits into
mainfrom
new-dbs-and-benchmarks
Open

Add Db2/MSSQL/Oracle engines and TPC-H, Wikipedia, YCSB, CH-benCHmark benchmarks#21
ribalba wants to merge 3 commits into
mainfrom
new-dbs-and-benchmarks

Conversation

@ribalba

@ribalba ribalba commented Jul 17, 2026

Copy link
Copy Markdown
Member

Split of #20 — part 1 of 2. This is the default-configuration half: every engine runs stock, nothing tuned beyond what's needed to make it run. The tuning tiers follow in part 2 (stacked on this branch).

Structure

The repo moves to two trees: benchmarks/ for the GMT usage scenarios (one folder per benchmark) and db/ for the per-engine driver scripts (one folder per engine). The three root usage_scenario_*.yml files are replaced by benchmarks/<benchmark>/<db>.yml.

Engines

Adds IBM Db2, Microsoft SQL Server and Oracle Database Free alongside Postgres/MariaDB/MySQL. Db2 needs a one-time image build (db/db2/build-image.sh) because HammerDB's db2tcl binding requires the full Db2 client, not the free CLI driver — see the Db2 setup section in the README.

Benchmarks

Adds TPC-H (HammerDB TPROC-H) plus Wikipedia, YCSB and CH-benCHmark, the latter three driven by a new BenchBase container (benchmarks/benchbase/build-image.sh). There is no Db2 BenchBase profile, so Db2 has TPC-C/TPC-H only.

Fairness

Every DB service gets an equal 4-CPU / 8-GB budget in compose.yml, and the load drivers are left unconstrained so they never bottleneck generation.

Tooling

  • run_on_cluster.py — discovers every scenario and submits it to the GMT cluster, refusing to run on an unclean or unpushed tree (the cluster measures GitHub, not your working tree).
  • check_repo.py — enforces the fairness invariants: the per-benchmark compose.yml copies match the root source of truth, DB resource budgets are equal, and driver scripts use the same knobs across engines.

check_repo.py passes on this branch with one expected warning: tpch.degree_of_parallel isn't set for maria/mysql/db2, which have no parallel-query knob in HammerDB.

🤖 Generated with Claude Code

Summary

  • Added Db2, Oracle Free, and Microsoft SQL Server support with equal 4-CPU/8-GB resource limits and health checks.
  • Added TPC-H, Wikipedia, YCSB, and CH-benCHmark workloads alongside existing TPC-C coverage using HammerDB and BenchBase.
  • Restructured scenarios into benchmarks/ and per-engine scripts/configurations into db/.
  • Added Db2 and BenchBase image-build scripts and documentation.
  • Added run_on_cluster.py for validated cluster submissions.
  • Added check_repo.py to verify compose consistency, resource fairness, and benchmark parameters.
  • Standardized benchmark sizing and virtual-user settings for fair comparisons.

… benchmarks

Restructures the repo into two trees: benchmarks/ holds the GMT usage
scenarios (one folder per benchmark), db/ holds the per-engine driver
scripts (one folder per engine). Replaces the three root
usage_scenario_*.yml files.

Engines: adds IBM Db2, Microsoft SQL Server and Oracle Database Free
alongside the existing Postgres/MariaDB/MySQL. Db2 needs a one-time image
build (db/db2/build-image.sh) because HammerDB's db2tcl binding needs the
full Db2 client.

Benchmarks: adds TPC-H (HammerDB TPROC-H) plus Wikipedia, YCSB and
CH-benCHmark driven by a new BenchBase container. Every engine gets an
equal 4-CPU / 8-GB budget in compose.yml so the energy comparison is fair.

Tooling:
- run_on_cluster.py discovers every scenario and submits it to the GMT
  cluster, refusing to run on an unclean or unpushed tree.
- check_repo.py enforces the fairness invariants: the per-benchmark
  compose.yml copies match the root, DB resource budgets are equal, and
  the driver scripts use the same knobs across engines.

All scenarios here are stock/default engine configuration; tuning follows
in a separate PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ArneTR

ArneTR commented Jul 22, 2026

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The repository now supports HammerDB and BenchBase workloads across PostgreSQL, MariaDB, MySQL, Oracle, Microsoft SQL Server, and Db2. It adds shared Compose environments, TPC-C, TPC-H, Wikipedia, YCSB, and CH-benCHmark scenarios, engine-specific driver scripts and XML configurations, Db2 and BenchBase image-build tooling, repository consistency checks, expanded setup documentation, and a cluster submission utility.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 45.83% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding Db2, MSSQL, and Oracle support plus new benchmark suites.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (7)
benchmarks/benchbase/Dockerfile (1)

74-85: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Run the benchmark driver as a non-root user.

The runtime container executes scenario-supplied shell commands as root. Create a dedicated user, make /benchbase writable by it, and switch with USER; verify any mounted result paths remain writable.

Source: Linters/SAST tools

benchmarks/chbenchmark/compose.yml (2)

95-95: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Pin db2, hammerdb, and benchbase images instead of :latest.

Every DB engine here is pinned to an exact version (postgres:18.4-trixie, mysql:9.7.1-oraclelinux9, etc.) except icr.io/db2_community/db2:latest, tpcorg/hammerdb:latest, and ribalba/benchbase:latest. For a benchmark suite whose stated goal is a fair, reproducible comparison, an unpinned driver/engine image can silently change behavior or performance between runs.

Also applies to: 125-131


86-91: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

MSSQL healthcheck only confirms the TCP port is open, not that SQL Server is ready to serve queries.

mssql/server images are known to open port 1433 before the engine has finished first-run initialization; a bare TCP check can report "healthy" while sqlcmd/schema-build steps would still fail. Consider a login-level check (e.g. sqlcmd -Q "SELECT 1") if the image ships sqlcmd.

benchmarks/tpcc/db2.yml (1)

1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Db2 image pinned to mutable :latest tag. Both Db2 scenario files reference ribalba/hammerdb-db2:latest, a personal Docker Hub namespace with no immutable tag/digest. Since this PR's goal is fair, reproducible cross-engine comparisons, a latest tag that can change between the image build and the actual benchmark run undermines reproducibility.

  • benchmarks/tpcc/db2.yml#L19-23: pin the image to a specific tag or digest produced by db/db2/build-image.sh.
  • benchmarks/tpch/db2.yml#L24-28: same fix.
db/mssql/tpcc/mssql_tprocc_buildschema.tcl (1)

16-17: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Centralize benchmark database credentials. Every listed driver hard-codes a predictable login/password pair. Inject credentials from Compose or deployment-time environment/configuration, fail fast when absent, and reserve any default only for explicitly isolated local runs.

  • db/mssql/tpcc/mssql_tprocc_buildschema.tcl#L16-L17: replace the embedded MSSQL credential with the runtime value.
  • db/mssql/tpcc/mssql_tprocc_deleteschema.tcl#L16-L17: use the same runtime credential for cleanup.
  • db/mssql/tpcc/mssql_tprocc_run.tcl#L16-L17: use the runtime credential for workload execution.
  • db/mssql/tpch/mssql_tproch_buildschema.tcl#L16-L17: replace the embedded MSSQL credential with the runtime value.
  • db/mssql/tpch/mssql_tproch_deleteschema.tcl#L16-L17: use the same runtime credential for cleanup.
  • db/mssql/tpch/mssql_tproch_run.tcl#L16-L17: use the runtime credential for workload execution.
  • db/mysql/tpcc/mysql_tprocc_buildschema.tcl#L15-L16: replace the embedded MySQL credential with the runtime value.
  • db/mysql/tpcc/mysql_tprocc_deleteschema.tcl#L11-L12: use the same runtime credential for cleanup.
  • db/mysql/tpcc/mysql_tprocc_run.tcl#L11-L12: use the runtime credential for workload execution.
run_on_cluster.py (2)

48-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Type fail() as NoReturn instead of returning "None".

fail() always exits; typing it NoReturn (from typing) removes the need for the # type: ignore[union-attr] workaround at line 70 and lets type checkers correctly narrow spec/spec.loader after every fail(...) call site in this file.

Proposed fix
+from typing import NoReturn
...
-def fail(message: str) -> "None":
+def fail(message: str) -> NoReturn:
     """Print an error to stderr and exit non-zero."""
     print(f"error: {message}", file=sys.stderr)
     sys.exit(1)

161-165: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

build_name accepts branch but never uses it, so scenario names collide across branches.

Two different branches submitting the same scenario both get the name "{prefix} tpcc/pg"; branch is preserved separately in the payload (line 351), but the display name itself can't distinguish runs by branch.

 def build_name(prefix: str, rel_path: Path, branch: str) -> str:
-    """A useful, unambiguous run name, e.g. 'DBMS-bench tpcc/pg'."""
+    """A useful, unambiguous run name, e.g. 'DBMS-bench tpcc/pg (main)'."""
     benchmark = rel_path.parent.name  # tpcc / tpch (drop the benchmarks/ prefix)
     db = rel_path.stem  # pg, maria, ...
-    return f"{prefix} {benchmark}/{db}"
+    return f"{prefix} {benchmark}/{db} ({branch})"

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 25ce505e-4633-49fc-88f4-f7b5b2f2fb50

📥 Commits

Reviewing files that changed from the base of the PR and between 99e3996 and ed1ef3e.

📒 Files selected for processing (95)
  • README.md
  • benchmarks/benchbase/Dockerfile
  • benchmarks/benchbase/build-image.sh
  • benchmarks/chbenchmark/compose.yml
  • benchmarks/chbenchmark/maria.yml
  • benchmarks/chbenchmark/mssql.yml
  • benchmarks/chbenchmark/mysql.yml
  • benchmarks/chbenchmark/oracle.yml
  • benchmarks/chbenchmark/pg.yml
  • benchmarks/tpcc/compose.yml
  • benchmarks/tpcc/db2.yml
  • benchmarks/tpcc/maria.yml
  • benchmarks/tpcc/mssql.yml
  • benchmarks/tpcc/mysql.yml
  • benchmarks/tpcc/oracle.yml
  • benchmarks/tpcc/pg.yml
  • benchmarks/tpch/compose.yml
  • benchmarks/tpch/db2.yml
  • benchmarks/tpch/maria.yml
  • benchmarks/tpch/mssql.yml
  • benchmarks/tpch/mysql.yml
  • benchmarks/tpch/oracle.yml
  • benchmarks/tpch/pg.yml
  • benchmarks/wikipedia/compose.yml
  • benchmarks/wikipedia/maria.yml
  • benchmarks/wikipedia/mssql.yml
  • benchmarks/wikipedia/mysql.yml
  • benchmarks/wikipedia/oracle.yml
  • benchmarks/wikipedia/pg.yml
  • benchmarks/ycsb/compose.yml
  • benchmarks/ycsb/maria.yml
  • benchmarks/ycsb/mssql.yml
  • benchmarks/ycsb/mysql.yml
  • benchmarks/ycsb/oracle.yml
  • benchmarks/ycsb/pg.yml
  • check_repo.py
  • compose.yml
  • db/db2/Dockerfile.hammerdb-db2
  • db/db2/build-image.sh
  • db/db2/tpcc/db2_tprocc_buildschema.tcl
  • db/db2/tpcc/db2_tprocc_deleteschema.tcl
  • db/db2/tpcc/db2_tprocc_run.tcl
  • db/db2/tpch/db2_tproch_buildschema.tcl
  • db/db2/tpch/db2_tproch_deleteschema.tcl
  • db/db2/tpch/db2_tproch_run.tcl
  • db/maria/chbenchmark/maria_chbenchmark_config.xml
  • db/maria/tpcc/maria_tprocc_buildschema.tcl
  • db/maria/tpcc/maria_tprocc_deleteschema.tcl
  • db/maria/tpcc/maria_tprocc_run.tcl
  • db/maria/tpch/maria_tproch_buildschema.tcl
  • db/maria/tpch/maria_tproch_deleteschema.tcl
  • db/maria/tpch/maria_tproch_run.tcl
  • db/maria/wikipedia/maria_wikipedia_config.xml
  • db/maria/ycsb/maria_ycsb_config.xml
  • db/mssql/chbenchmark/mssql_chbenchmark_config.xml
  • db/mssql/tpcc/mssql_tprocc_buildschema.tcl
  • db/mssql/tpcc/mssql_tprocc_deleteschema.tcl
  • db/mssql/tpcc/mssql_tprocc_run.tcl
  • db/mssql/tpch/mssql_tproch_buildschema.tcl
  • db/mssql/tpch/mssql_tproch_deleteschema.tcl
  • db/mssql/tpch/mssql_tproch_run.tcl
  • db/mssql/wikipedia/mssql_wikipedia_config.xml
  • db/mssql/ycsb/mssql_ycsb_config.xml
  • db/mysql/chbenchmark/mysql_chbenchmark_config.xml
  • db/mysql/tpcc/mysql_tprocc_buildschema.tcl
  • db/mysql/tpcc/mysql_tprocc_deleteschema.tcl
  • db/mysql/tpcc/mysql_tprocc_run.tcl
  • db/mysql/tpch/mysql_tproch_buildschema.tcl
  • db/mysql/tpch/mysql_tproch_deleteschema.tcl
  • db/mysql/tpch/mysql_tproch_run.tcl
  • db/mysql/wikipedia/mysql_wikipedia_config.xml
  • db/mysql/ycsb/mysql_ycsb_config.xml
  • db/oracle/chbenchmark/oracle_chbenchmark_config.xml
  • db/oracle/tpcc/oracle_tprocc_buildschema.tcl
  • db/oracle/tpcc/oracle_tprocc_deleteschema.tcl
  • db/oracle/tpcc/oracle_tprocc_run.tcl
  • db/oracle/tpch/oracle_tproch_buildschema.tcl
  • db/oracle/tpch/oracle_tproch_deleteschema.tcl
  • db/oracle/tpch/oracle_tproch_run.tcl
  • db/oracle/wikipedia/oracle_wikipedia_config.xml
  • db/oracle/ycsb/oracle_ycsb_config.xml
  • db/pg/chbenchmark/pg_chbenchmark_config.xml
  • db/pg/tpcc/pg_tprocc_buildschema.tcl
  • db/pg/tpcc/pg_tprocc_deleteschema.tcl
  • db/pg/tpcc/pg_tprocc_run.tcl
  • db/pg/tpch/pg_tproch_buildschema.tcl
  • db/pg/tpch/pg_tproch_deleteschema.tcl
  • db/pg/tpch/pg_tproch_run.tcl
  • db/pg/wikipedia/pg_wikipedia_config.xml
  • db/pg/ycsb/pg_ycsb_config.xml
  • pg/benchmark_tests.tcl
  • run_on_cluster.py
  • usage_scenario_maria.yml
  • usage_scenario_mysql.yml
  • usage_scenario_pg.yml
💤 Files with no reviewable changes (4)
  • usage_scenario_maria.yml
  • usage_scenario_pg.yml
  • usage_scenario_mysql.yml
  • pg/benchmark_tests.tcl

Comment on lines +24 to +41
mariadb:
image: mariadb:13.0.1-rc
container_name: mariadb_container
cpus: 4
mem_limit: 8g
environment:
MYSQL_ROOT_PASSWORD: maria
MYSQL_DATABASE: maria
MYSQL_USER: maria
MYSQL_PASSWORD: maria
# ports:
# - "3306:3306"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Is MariaDB 13.0.1 a stable GA release or a release candidate?

💡 Result:

MariaDB 13.0.1 is classified as a Release Candidate (RC) [1][2][3]. It is not a stable Generally Available (GA) release [1][4]. Official MariaDB documentation and release records explicitly label the 13.0.1 version, released on May 29, 2026, as an RC release [1][5][4].

Citations:


Use a GA MariaDB tag here13.0.1-rc is still a release candidate, so this benchmark can produce non-representative results versus the other stable engine images.

Comment thread benchmarks/chbenchmark/compose.yml
Comment thread benchmarks/chbenchmark/compose.yml
Comment thread benchmarks/chbenchmark/mysql.yml Outdated
@@ -0,0 +1,50 @@
---
name: BenchBase MySQL CH-benCHmark benchmark
author: Didi Hoffmann <didi@green-coding.berlin)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the author-email delimiter in all BenchBase scenarios.

Each address starts with < but ends with ). Replace the closing delimiter with >.

  • benchmarks/chbenchmark/mysql.yml#L3-L3: change ) to >.
  • benchmarks/chbenchmark/oracle.yml#L3-L3: change ) to >.
  • benchmarks/chbenchmark/pg.yml#L3-L3: change ) to >.
  • benchmarks/wikipedia/maria.yml#L3-L3: change ) to >.
  • benchmarks/wikipedia/mssql.yml#L3-L3: change ) to >.
📍 Affects 5 files
  • benchmarks/chbenchmark/mysql.yml#L3-L3 (this comment)
  • benchmarks/chbenchmark/oracle.yml#L3-L3
  • benchmarks/chbenchmark/pg.yml#L3-L3
  • benchmarks/wikipedia/maria.yml#L3-L3
  • benchmarks/wikipedia/mssql.yml#L3-L3

Comment thread benchmarks/tpcc/mysql.yml Outdated
Comment on lines +2 to +4
name: HammerDB Postgres benchmark
author: Didi Hoffmann <didi@green-coding.berlin)
description: Benchmarks postgresql with HammerDB using TPC-C

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Wrong benchmark name/description: says "Postgres" in the MySQL scenario file.

This file is benchmarks/tpcc/mysql.yml but the name/description are copy-pasted verbatim from pg.yml and still describe a Postgres benchmark. Since these fields presumably label results for the multi-engine fairness comparison this PR is building, this will mislabel MySQL benchmark runs.

🐛 Proposed fix
-name: HammerDB Postgres benchmark
+name: HammerDB MySQL benchmark
 author: Didi Hoffmann <didi@green-coding.berlin)
-description: Benchmarks postgresql with HammerDB using TPC-C
+description: Benchmarks mysql with HammerDB using TPC-C
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name: HammerDB Postgres benchmark
author: Didi Hoffmann <didi@green-coding.berlin)
description: Benchmarks postgresql with HammerDB using TPC-C
name: HammerDB MySQL benchmark
author: Didi Hoffmann <didi@green-coding.berlin)
description: Benchmarks mysql with HammerDB using TPC-C

Comment thread benchmarks/tpch/db2.yml
Comment thread benchmarks/tpch/mysql.yml Outdated
Comment on lines +30 to +48
command: ./hammerdbcli auto /tmp/repo/db/mysql/tpch/mysql_tproch_buildschema.tcl | tee /dev/stderr | awk '/query [0-9]+ completed in/{q++} END{if(q>0){"date +%s"|getline ts; printf("%s000000 tpch_queries=%d\n", ts, q)}}'
shell: sh
log-stdout: true
read-sci-stdout: true
- name: Run Queries
container: hammerdb_container
commands:
- type: console
note: RUN HAMMERDB QUERIES
command: ./hammerdbcli auto /tmp/repo/db/mysql/tpch/mysql_tproch_run.tcl | tee /dev/stderr | awk 'END{"date +%s"|getline ts; printf("%s000000 tpch_queries=22\n", ts)}'
shell: sh
log-stdout: true
read-sci-stdout: true
- name: Drop Schema
container: hammerdb_container
commands:
- type: console
note: RUN HAMMERDB DROP
command: ./hammerdbcli auto /tmp/repo/db/mysql/tpch/mysql_tproch_deleteschema.tcl | tee /dev/stderr | awk '/query [0-9]+ completed in/{q++} END{if(q>0){"date +%s"|getline ts; printf("%s000000 tpch_queries=%d\n", ts, q)}}'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Preserve HammerDB failures before publishing TPC-H work metrics.

Each tee | awk pipeline returns awk’s status rather than hammerdbcli’s. A failed driver run therefore succeeds at the scenario level; the query stage additionally emits tpch_queries=22 even when zero queries ran. Capture and check HammerDB’s exit status first, then derive the metric from validated output (or fail when the expected 22 completions are absent).

  • benchmarks/tpch/mysql.yml#L30-L48: make all three HammerDB stages propagate driver failures; only emit the run metric after validating completed queries.
  • benchmarks/tpch/oracle.yml#L34-L52: make all three HammerDB stages propagate driver failures; only emit the run metric after validating completed queries.
  • benchmarks/tpch/pg.yml#L30-L48: make all three HammerDB stages propagate driver failures; only emit the run metric after validating completed queries.
📍 Affects 3 files
  • benchmarks/tpch/mysql.yml#L30-L48 (this comment)
  • benchmarks/tpch/oracle.yml#L34-L52
  • benchmarks/tpch/pg.yml#L30-L48

Comment thread benchmarks/wikipedia/mysql.yml Outdated
commands:
- type: console
note: BENCHBASE EXECUTE
command: cd /benchbase/benchbase-mysql && java -jar benchbase.jar -b wikipedia -c /tmp/repo/db/mysql/wikipedia/mysql_wikipedia_config.xml --create=false --load=false --execute=true | tee /dev/stderr | awk 'match($0,/measuredRequests=[0-9]+/) {v=substr($0,RSTART+17,RLENGTH-17)} END {if (v!="") {"date +%s"|getline ts; printf("%s000000 wikipedia_requests=%s\n", ts, v)}}'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not mask failed benchmark runs or missing functional-unit metrics.

Under sh, this pipeline returns awk’s status, so a failed java process can still mark the scenario successful. awk also exits zero when no measuredRequests line is found, producing a successful run without its SCI metric. POSIX defines the pipeline status as the rightmost command’s status when pipefail is not enabled. (pubs.opengroup.org)

  • benchmarks/wikipedia/mysql.yml#L47-L47: capture BenchBase output, fail on Java failure, and fail when measuredRequests is absent.
  • benchmarks/wikipedia/oracle.yml#L47-L47: apply the same guarded execution.
  • benchmarks/wikipedia/pg.yml#L47-L47: apply the same guarded execution.
  • benchmarks/ycsb/maria.yml#L47-L47: apply the same guarded execution.
  • benchmarks/ycsb/mssql.yml#L47-L47: apply the same guarded execution.
  • benchmarks/ycsb/mysql.yml#L47-L47: apply the same guarded execution.
  • benchmarks/ycsb/oracle.yml#L47-L47: apply the same guarded execution.
  • benchmarks/ycsb/pg.yml#L47-L47: apply the same guarded execution.

Use a temporary output file: run java into it, print it to stderr, abort on a non-zero Java exit, then parse the file with awk whose END block exits non-zero when v is empty.

📍 Affects 8 files
  • benchmarks/wikipedia/mysql.yml#L47-L47 (this comment)
  • benchmarks/wikipedia/oracle.yml#L47-L47
  • benchmarks/wikipedia/pg.yml#L47-L47
  • benchmarks/ycsb/maria.yml#L47-L47
  • benchmarks/ycsb/mssql.yml#L47-L47
  • benchmarks/ycsb/mysql.yml#L47-L47
  • benchmarks/ycsb/oracle.yml#L47-L47
  • benchmarks/ycsb/pg.yml#L47-L47

Comment thread README.md
Comment on lines +69 to +72
Notes:

- The Db2 server container requires `privileged: true`, and the host must allow it.
- Db2 is slow to start (minutes) and loads via INSERTs, so it builds slower than the bulk-loaded engines.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
fd -e yml . benchmarks/tpcc benchmarks/tpch --exec rg -n -A2 -B2 'privileged|cap_add' {} \;
rg -n -A2 -B2 'privileged|cap_add' compose.yml

Repository: green-coding-solutions/DBMS-bench

Length of output: 1401


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== README excerpt ==\n'
sed -n '60,78p' README.md

printf '\n== Db2 compose files ==\n'
for f in benchmarks/tpcc/db2.yml benchmarks/tpch/db2.yml compose.yml; do
  echo "--- $f ---"
  sed -n '1,180p' "$f"
done

Repository: green-coding-solutions/DBMS-bench

Length of output: 13513


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== locate Db2 service definitions ==\n'
rg -n -A4 -B4 'db2|privileged|cap_add|CAP_IPC_OWNER|sysctl' benchmarks/tpcc/db2.yml benchmarks/tpch/db2.yml compose.yml

Repository: green-coding-solutions/DBMS-bench

Length of output: 13362


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
for p in [Path('benchmarks/tpcc/db2.yml'), Path('benchmarks/tpch/db2.yml'), Path('compose.yml')]:
    print(f"\n### {p}")
    text = p.read_text()
    for key in ['privileged', 'cap_add', 'CAP_IPC_OWNER', '--privileged']:
        if key in text:
            print(f"contains {key}")
PY

Repository: green-coding-solutions/DBMS-bench

Length of output: 311


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# show exact lines around any Db2 capability notes in YAMLs
for f in benchmarks/tpcc/db2.yml benchmarks/tpch/db2.yml compose.yml; do
  echo "--- $f ---"
  nl -ba "$f" | sed -n '85,120p'
done

Repository: green-coding-solutions/DBMS-bench

Length of output: 243


Replace privileged: true with the actual Db2 capability requirement README.md:69-72 — the runtime compose setup only adds CAP_IPC_OWNER via cap_add; it doesn’t require full privileged: true.

@ribalba

ribalba commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

Runs started to see that evrything works out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants